//解法2：前缀和+hash+同余定理
        unordered_map<int,int> hash;
        hash[0%k] =1;
        int sum = 0;int ret = 0;
        for(auto e: nums){
            sum+=e;
            int r = (sum%k+k)%k;
            if(hash.count(r)) ret+=hash[r];
            hash[r]++;
        }

        return ret;

